package localdatetime01;


import java.time.LocalDateTime;

/*  2.设置功能
*     static LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute)
*      LocalDateTime withHour(int hour)
*      LocalDateTime withMinute(int minute)
*/
public class LocalDateTimeDemo02 {
    public static void main(String[] args) {
        method01();
    }

    private static void method01() {
        LocalDateTime datetime = LocalDateTime.of(2013, 11, 12, 14, 20);
        System.out.println(datetime);   // 2013-11-12T14:20
        System.out.println(LocalDateTime.now());  // 2024-04-19T23:01:11.504081100
        System.out.println(LocalDateTime.now().withHour(10).withMinute(20)); //  2024-04-19T10:20:11.505281300
    }
}
